package feeelinganalyzer.analyzers;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;

public class TweetFilesReader {

	private StaticFeaturesExtractor extractor;
	
	public void analyze(String file) throws IOException, InterruptedException{
		BufferedReader bf = new BufferedReader(new FileReader(new File(file)));
		
		while(true){
			String t = bf.readLine();
			if(t == null){
				break;
			}
			extractor = new StaticFeaturesExtractor(t);
			System.out.println(extractor.toString());
			Thread.sleep(5000);
		}
	}
	
	public static void main(String[] args) throws IOException, InterruptedException {
		TweetFilesReader t = new TweetFilesReader();
		t.analyze("tweets/coleta0.txt");
	}
	
}
